class Person {
    get name() {
        return this._name;
    }
    set name(arg) {
        this._name = arg;
    }

    get id() {
        return this._id;
    }
    set id(arg) {
        this._id = arg;
    }
}

const martin = new Person();
martin._name = "martin";
martin._id = "12324";
/****************************************************** */
// 如果不想修改id
class Person {
    constructor(id) {
        this._id = id;
    }
    get name() {
        return this._name; 
    }
    set name(arg) {
        this._name = arg;
    }

    get id() {
        return this._id;
    }
}

const martin = new Person("1234");
martin._name = "martin";